package com.example.live;

import org.springframework.stereotype.Service;
import java.util.UUID;

/**
 * @author pengbenlei
 * @date 2024/9/13 13:46
 * @desc
 */
@Service
public class StreamServiceImpl implements StreamService {

    @Override
    public String generateURL() {
        String token = null;
        String stream = null;
        try{
            token = TokenUtils.sign("jx");
            stream= UUID.randomUUID().toString();
        }catch (Exception e){
            e.getStackTrace();
        }
        String url="rtmp://192.168.5.105/live/"+stream+"?token="+token;
        return url;
    }
}
